//package com.bbcare.jiangmen.controller;
//
//
//import com.alibaba.fastjson.JSON;
//import com.alibaba.fastjson.JSONObject;
//import com.bbcare.comm.AppException;
//import com.bbcare.comm.ErrorCode;
//import com.bbcare.jiangmen.service.IHisInfoJiangmenService;
//import com.bbcare.jiangmen.util.MqEwellService;
//import com.github.pagehelper.PageInfo;
//import org.apache.log4j.Logger;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.Arrays;
//import java.util.List;
//import java.util.Map;
//
///**
// * @Title		HisInfoJiangmenController.java
// * @Package		com.bbcare.jiangmen.controller
// * @Description	江门his对接
// * @Author		<a href="mailto:jiangqian_java@163.com">jiang</a>
// * @Date		2023/6/5
// * @Version		V1.0
// * @Copyright	(c) Shanghai BBcare Medical Equipment Co.,Ltd.
// */
//@RestController
//@RequestMapping("/service/jiangmenHisInfo")
//public class HisInfoJiangmenController {
//
//    public static final Logger logger = Logger.getLogger(HisInfoJiangmenController.class);
//
//    @Autowired
//    private IHisInfoJiangmenService hisInfoJiangmenService;
//
//    /**
//     * 黔西南默认儿科代码 1
//     */
//    public static List<String> deptCodeList = Arrays.asList("210703");
//
//    /**
//     * 获取患者列表接口
//     *
//     * @return
//     * @throws Exception
//     */
//    @PostMapping("/getPatientList")
//    public PageInfo getPatientList(@RequestBody String arg) throws Exception {
//        logger.info("=================getPatientList 请求入参："+arg+"===============================================================");
//        JSONObject jsonArg = null;
//        try {
//            jsonArg = JSON.parseObject(arg);
//        } catch (Exception ex) {
//            logger.error(ex.getMessage());
//            throw (new AppException(ErrorCode.FOLLOWUP_EXCEPTION_TYPE_INPUT_DATA_FORMAT_ERROR, "入参格式错误，非json格式！"));
//        }
//
//        return hisInfoJiangmenService.getPatientList(jsonArg, deptCodeList);
//    }
//
//
//    @PostMapping("/getPatientInfoByVisitCardNo")
//    public PageInfo getPatientInfoByVisitCardNo(@RequestBody String arg) throws Exception {
//        logger.info("=================getPatientInfoByVisitCardNo 请求入参："+arg+"===============================================================");
//        JSONObject jsonArg = null;
//        try {
//            jsonArg = JSON.parseObject(arg);
//        } catch (Exception ex) {
//            logger.error(ex.getMessage());
//            throw (new AppException(ErrorCode.FOLLOWUP_EXCEPTION_TYPE_INPUT_DATA_FORMAT_ERROR, "入参格式错误，非json格式！"));
//        }
//
//        return hisInfoJiangmenService.getPatientInfoByVisitCardNo(jsonArg);
//    }
//
//    @GetMapping("/test")
//    public String test(@RequestBody Map<String, String> mapParam) throws Exception {
//        String fid = mapParam.get("fid");
//        String orderNo = mapParam.get("orderNo");
//        String query = mapParam.get("query");
//        String dataFromMq = MqEwellService.getDataFromMq(fid, orderNo, query);
//        return dataFromMq;
//    }
//
//}
